package com.vftour.stu.mq.rabbitmq.handler;

import com.vftour.stu.mq.rabbitmq.constant.RabbitConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * MessageQueueHandler
 *
 * @version 1.0
 * @author: 东东 | d@tke.store
 * @date :  2022/3/5 6:32 下午
 */
@Slf4j
@RabbitListener(queues = RabbitConstant.QUEUE_SIMPLE)
@Component
public class MessageQueueHandler {

    @RabbitHandler
    public void handler(Map<String,String> message) {
        System.out.println("two-----" + message);
    }
}
